package com.hm.cdz.trace;

/**
 * @author shishun.wang
 * @date 2018年5月4日 下午3:53:11
 * @version 1.0
 * @describe
 */
public class Trance76 {

	public static void main(String[] args) throws Exception {
		String str = "435329007601088A291B890B28 000002010103063030303030307F0B48656C6C6F436861726765FE4553531F007601088A291B890B28000002010103063030303030306F0100 A645";

		str = "000002010103063030303030307F0B48656C6C6F436861726765FE4553531F007601088A291B890B28000002010103063030303030306F0100";

		String s = convertHexToString(str);
		System.out.println("数字签名:" + s);
	}

	public static final String convertHexToString(String hex) {
		StringBuilder sb = new StringBuilder();
		StringBuilder temp = new StringBuilder();

		for (int i = 0; i < hex.length() - 1; i += 2) {

			// grab the hex in pairs
			String output = hex.substring(i, (i + 2));
			// convert hex to decimal
			int decimal = Integer.parseInt(output, 16);
			// convert the decimal to character
			sb.append((char) decimal);

			temp.append(decimal);
		}
		return sb.toString();
	}
}
